/*
 * Copyright 2009 Max Kugland
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.splink.deepsplink.processor {

	/**
	 * An <code>IProcessor</code> implementation can be added to 
	 * an <code>IDeeplinkController</code> implementation. After an 
	 * incoming page change request, the process method of the 
	 * <code>IProcessor</code> is invoked. This is particulary handy 
	 * for undo, user tracking or click recording.
	 * 
	 * @author Max Kugland
	 */
	public interface IProcessor {
		/**
		 * After a gotoPage request has been issued, the process method of the 
		 * <code>IProcessor</code> is invoked if it has been added to the 
		 * <code>IDeeplinkController<code> before.
		 * 
		 * @param pageId the id of the page which is shown next
		 * @param pageParams an array of <code>PageParameter</code> instances
		 */
		function process(pageId : String, pageParams : Array) : void;
	}
}
